import React from 'react';
import store from 'store'
import { withRouter, Redirect } from 'react-router-dom'

class Authorized extends React.PureComponent {

    render() {
        if (!store.get('user') || !store.get('token')) {
            // return <Redirect to="/login" />
        }
        return this.props.children
    }
}

export default withRouter(Authorized)